is there a way to assign the title field and/or a cck image field of a post so that when it's clicked, instead of going to the full node page, a thickbox/lightbox pops up and displays a flash movie (by using a .flv url that's been entered in a cck field)? Would like to do this with SWF Tools...

Comments

sleepingmonk’s picture

Anyone? This would be a great feature but so far my research has only turned up posts saying this is not compatible with some browsers.

I've played with the different thickbox methods with no luck. I've read that you can call it in via an html file but that's not practical on a Drupal system.

I'll be watching this thread and posting any findings.

--
To Your Success!

criznach’s picture

Thickbox is very flexible. I'd recommend looking at the code and experimenting with it a bit. I've made it do some fancy tricks, but it takes some thought. Look at how it's done both with and without drupal. The thickbox site gives examples of how to do most things you'd want to.

sleepingmonk’s picture

Here is some code I used to embed the mediaplayer.swf into thickbox to play a .flv file.

<a href="#TB_inline?inlineId=video&height=240&width=320" class="thickbox" title="video title">Play the Video in Thickbox</a>

<div id = "video" style = "display: none;"><embed src="/mediaplayer.swf" allowfullscreen="false" allowscriptaccess="always" flashvars="&height=240&width=320&shuffle=false&repeat=list&autostart=true&file=/files/video.flv"  style = "width: 320px; height: 240px;" /></div>

I've only tested it in FF on linux so far. The only problem I've found is that it takes about 3 or 4 seconds to close the thickbox window after you click close. That's kind of annoying. Not sure what causes that.

Definitely won't go live with this until I test it in other browsers and maybe find a way to fix the delay on closing the window.

--
To Your Success!

dodwyer’s picture

Hey sleepingmonk,

That code works great, but when i add the same code to a page twice or more mediaplayer.swf plays the song listed first regardless.

Any ideas why?

Cheers,

D

jwall72’s picture

You need to set up unique div IDs for each instance on your page. Rather than using div id="video" for each instance, use div id="video1" for the first instance, div id="video2" for the second instance, etc... You can set up a simple counter to add the number.

dexterartics’s picture

i am really happy to find that treath, but i cant get it work.

the code only open a new thickbox, nothing in there.

is that a specific flash player i need? i used a own one and replaced the path, i also replaced the path of the video, but nothing happens.

how to handle the div frame? i will try around with the code but i would be pretty happy if someone got some hints.

regards ronny!